#include <map>
#include <string>
#include <fstream>
#include <iostream>

void read_csv(std::string filename, std::map<std::string, std::string> &out_map)
{
    std::ifstream inFile(filename, std::ios::in);
    if (!inFile.is_open())
    {
        return;
    }
    std::string lineStr;
    while (getline(inFile, lineStr))
    {
        std::string::size_type split_pos;
        split_pos = lineStr.find(",");
        std::string key = lineStr.substr(0, split_pos);
        std::string value = lineStr.substr(split_pos + 1, lineStr.size());
        out_map[key] = value;
    }
}
